package com.ruoyi.project.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.SysSkuMapper;
import com.ruoyi.project.system.domain.SysSku;
import com.ruoyi.project.system.service.ISysSkuService;

/**
 * 规格Service业务层处理
 * 
 * @author jjp
 * @date 2020-04-20
 */
@Service
public class SysSkuServiceImpl implements ISysSkuService 
{
    @Autowired
    private SysSkuMapper sysSkuMapper;

    /**
     * 查询规格
     * 
     * @param skuId 规格ID
     * @return 规格
     */
    @Override
    public SysSku selectSysSkuById(Long skuId)
    {
        return sysSkuMapper.selectSysSkuById(skuId);
    }

    /**
     * 查询规格列表
     * 
     * @param sysSku 规格
     * @return 规格
     */
    @Override
    public List<SysSku> selectSysSkuList(SysSku sysSku)
    {
        return sysSkuMapper.selectSysSkuList(sysSku);
    }

    /**
     * 新增规格
     * 
     * @param sysSku 规格
     * @return 结果
     */
    @Override
    public int insertSysSku(SysSku sysSku)
    {
        return sysSkuMapper.insertSysSku(sysSku);
    }

    /**
     * 修改规格
     * 
     * @param sysSku 规格
     * @return 结果
     */
    @Override
    public int updateSysSku(SysSku sysSku)
    {
        return sysSkuMapper.updateSysSku(sysSku);
    }

    /**
     * 批量删除规格
     * 
     * @param skuIds 需要删除的规格ID
     * @return 结果
     */
    @Override
    public int deleteSysSkuByIds(Long[] skuIds)
    {
        return sysSkuMapper.deleteSysSkuByIds(skuIds);
    }

    /**
     * 删除规格信息
     * 
     * @param skuId 规格ID
     * @return 结果
     */
    @Override
    public int deleteSysSkuById(Long skuId)
    {
        return sysSkuMapper.deleteSysSkuById(skuId);
    }

    @Override
    public SysSku selectSysSkuByTypeDetailId(Long typeDetailId) {
        return sysSkuMapper.selectSysSkuByTypeDetailId(typeDetailId);
    }

    @Override
    public int deleteSysSkuByTypeDetailId(Long typeDetailId) {
        return sysSkuMapper.deleteSysSkuByTypeDetailId(typeDetailId);
    }
}
